<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>分公司审核</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../res/css/layui.css" media="all">
<link rel="stylesheet" href="../../res/css/sh/audit.css" media="all">
<script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
</head>
<body>
	<from class="layui-form">
	<div class="demoTable" style="margin-left: 20px; margin-top: 10px;">
		审核状态:

		<div class="layui-inline">
			<select lay-filter="aihao" id="auStateSelect"
				style="width: 100px; border: 1px solid red;">
				<option value="">====请选择====</option>
				<option value="1">等待审核</option>
				<option value="2">已审核</option>
				<option value="4">未通过审核</option>
			</select>
		</div>


		加盟时间：
		<div class="layui-inline">
			<input class="layui-input" style="height: 32px;" name="id" id="date"
				placeholder="yyyy-MM-dd" autocomplete="off">
		</div>

		<button class="layui-btn layui-btn-sm" data-type="reload"
			id="selectButton">搜索</button>

	</div>
	</from>
	<table class="layui-table"
		lay-data="{ url:'../../branchAudit/findBraAllSum.action', page:true, id:'idTest'}"
		lay-filter="demo">
		<thead>
			<tr>
				<th lay-data="{type:'checkbox', fixed: 'left'}"></th>
				<th lay-data="{field:'all_id',align:'center',width:'310'}">加盟业务id</th>
				<th lay-data="{field:'optime', align:'center',width:'180'}">加盟时间</th>
				<th
					lay-data="{field:'oper',align:'center',width:'150'}">操作人</th>
				<th
					lay-data="{field:'au_state', align:'center',templet:'#auState',width:'150'}">审核状态</th>
				<th 
					lay-data="{fixed: 'right',fixed: 'right',width:'300', align:'center', toolbar: '#barDemo'}">操作</th>
			</tr>
		</thead>
	</table>
	<script type="text/javascript" id="isva">
{{# if(d.isva == 0) { }}
<div>否</div>
{{# }else if(d.isva == 1) { }}
<div>是</div>
{{# }}}
</script>
	<script type="text/javascript" id="auState">
	{{#  if(d.au_state == 1) { }}
	<div>加盟已审核等待总经理审核</div>
	{{# }else if(d.au_state == 2) { }}
	<div>已审核</div>
	{{# }else if(d.au_state == 4) { }}
	<div>总部审核未通过</div>
	{{# }}}
</script>
	<script type="text/html" id="barDemo">
     <button class="layui-btn layui-btn-xs" lay-event="detailBranch">查看分公司详情</button>
	 <button class="layui-btn layui-btn-xs" lay-event="detailAudit">查看审核详情</button>

{{# if(d.au_state == 1) { }}
<button class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">审核</button>
{{# }else if(d.au_state == 2) { }}
<button class="layui-btn layui-btn-warm layui-btn-xs layui-btn-disabled">审核通过</button>
{{# }else if(d.au_state == 4) { }}
<button class="layui-btn layui-btn-warm layui-btn-xs layui-btn-disabled">审核未通过</button>
{{# }}}
	
</script>

	<div id="detailProDiv" style="display: none;">
  
<table class="layui-table" lay-data="{ url:'../../branch/selectAll.action', page:true, id:'cxDetailTable'}" 
	lay-filter="demo">
			  <thead>
			    <tr>
			      <th lay-data="{type:'checkbox', fixed: 'left'}"></th>
			      <th lay-data="{field:'braName', align:'center',templet:'#imgTpls'}">分公司名称</th>
			      <th lay-data="{field:'braSite', align:'center'}">分公司地址</th>
			      <th lay-data="{field:'braExplain', align:'center'}">分公司说明</th>
			      <th lay-data="{field:'isvaName', align:'center',templet:'#imgTpl'}">审核是否通过</th>
			      <th lay-data="{field:'optime', align:'center'}">操作时间</th>
			      <th lay-data="{field:'oper', align:'center'}">操作人</th>
			    </tr>
			  </thead>	
		</table>
	</div>
	<div id="detailAuditDiv" style="display: none;">
		<table class="layui-table" lay-data="{ url:'../../audit/ProQuery.action', page:true, id:'auditTable'}" lay-filter="demo3">
			<thead>
				<tr>
					<th lay-data="{type:'checkbox', fixed: 'left'}"></th>
					<th lay-data="{field:'optime', align:'center'}">审核时间</th>
					<th lay-data="{field:'oper', align:'center'}">审核人</th>
					<th lay-data="{field:'au_state', align:'center',templet:'#zhungtai'}">审核状态</th>
					<th lay-data="{field:'au_idea', align:'center'}">审核意见</th>
					<th lay-data="{field:'au_comment', align:'center'}">审核部门</th>
				</tr>
			</thead>
		</table>
	</div>
	
	<div id="auditDiv" style="display: none;">
		<form class="layui-form" id="shForm" action="" method="post">
			<input type="hidden" name="auId" id="auId">
			<input type="hidden" name="all_id" id="all_id">
			  <div class="layui-form-item">
			    <label class="layui-form-label">审核部门</label>
			    <div class="layui-input-block">
			      <input type="hidden" name="auComment" value="总经理">
			      <input type="text" name="auComment" lay-verify="required" value="总经理" autocomplete="off" class="layui-input layui-disabled" disabled="" style="width:280px;" id="bumen">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">订单名称</label>
			    <div class="layui-input-block">
			      <input type="text" maxlength="20" value="商品生产订单" autocomplete="off" class="layui-input layui-disabled" disabled="" style="width:280px;">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">搜索选择框</label>
			      <div class="layui-input-inline">
			        <select lay-verify="required" lay-filter="isva" lay-search="" name="auState" id="auditPass">
			          <option value="">是否通过</option>
			          <option value="2">是</option>
			          <option value="4">否</option>
			        </select><div class="layui-form-select"><div class="layui-select-title"><input type="text" placeholder="是否通过" value="" class="layui-input"><i class="layui-edge"></i></div><dl class="layui-anim layui-anim-upbit"><dd lay-value="" class="layui-select-tips">是否通过</dd><dd lay-value="1" class="">是</dd><dd lay-value="0" class="">否</dd></dl></div>
			      </div>
			  </div>
			  <div class="layui-form-item layui-form-text" id="auditCause">
			    <label class="layui-form-label">审核意见</label>
				    <div class="layui-input-block">
				      <textarea placeholder="请输入内容" maxlength="20" name="auIdea" onblur="findAuIdea()" id="auIdea" class="layui-textarea" lay-verify="required" required=""></textarea>
				      <input type="hidden" class="shYz" id="auIdeaInput">
				    </div>
			  </div>
			  <div class="layui-form-item" style="margin: 0 auto;width:350px;">
			    <div class="layui-input-block">
			      <input type="button" class="layui-btn layui-btn-sm" lay-filter="roleAdd" value="确认" id="tj">
			      <a href="javascript:exit();" class="layui-btn layui-btn-danger layui-btn-sm">关闭</a>
			    </div>
			  </div>
		 </form>
	</div>
	<script src="../../res/layui.all.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../res/js/sh/snBranchAudit.js"></script>
</body>
</html>